@extends('home.pblic.public')

@section('content')


<div id="wrapper">       
<h1>
    <span property="v:itemreviewed">{{ $cates->name }} </span>
    <div class="clear"></div>
</h1>     
  <div id="content">
    <div class="grid-16-8 clearfix">  
      <div class="article">
<div class="indent">
  <div class="subjectwrap clearfix">
<div class="subject clearfix">
<div id="mainpic" class="">
  <a class="nbg" href="https://img3.doubanio.com/lpic/s29021863.jpg" title="{{ $cates->name }}">
    <img src="{{ $cates->pic }}" title="点击看大图" alt="{{ $cates->name }}" rel="v:photo" style="width: 107px">
  </a>
</div>
<div id="info" class="">
    <span>
      <span class="pl"> 作者</span>:
        <a class="" href="/search/%E8%A5%BF%E8%92%99%C2%B7%E6%B8%A9%E5%88%87%E6%96%AF%E7%89%B9">{{ $cates->actro }}</a>
    </span><br>
    <span class="pl">出版社:</span> {{ $cates->cbs }}<br>
    <span class="pl">出版年:</span> {{  $cates->date}}<br>
    <span class="pl">定价:</span> {{ $cates->price }}<br>
    <span class="pl">装帧:</span> 精装<br>
      <span class="pl">ISBN:</span> {{ $cates->id }}<br>
</div>
</div>
<div id="interest_sectl" class="">
  <div class="rating_wrap clearbox" rel="v:rating">
    <div class="rating_logo">豆瓣评分</div>
    <div class="rating_self clearfix" typeof="v:Rating">
      <strong class="ll rating_num " property="v:average"> 8.3 </strong>
      <span property="v:best" content="10.0"></span>
      <div class="rating_right ">
          <div class="ll bigstar45"></div>
            <div class="rating_sum">
                <span class="">
                <a href="collections" class="rating_people"><span property="v:votes">79</span>人评价</a>
                </span>
            </div>
      </div>
    </div>          
<span class="stars5 starstop" title="力荐">
    5星
</span>        
<div class="power" style="width:62px"></div>

            <span class="rating_per">44.3%</span>
            <br>          
<span class="stars4 starstop" title="推荐">
    4星
</span>         
<div class="power" style="width:51px"></div>
            <span class="rating_per">36.7%</span>
            <br>           
<span class="stars3 starstop" title="还行">
    3星
</span>        
<div class="power" style="width:23px"></div>
            <span class="rating_per">16.5%</span>
            <br>         
<span class="stars2 starstop" title="较差">
    2星
</span>
<div class="power" style="width:1px"></div>

            <span class="rating_per">1.3%</span>
            <br>         
<span class="stars1 starstop" title="很差">
    1星
</span>          
<div class="power" style="width:1px"></div>
            <span class="rating_per">1.3%</span>
            <br>
    </div>
</div>
  </div>
    <div id="interest_sect_level" class="clearfix">
        <a href="#" rel="nofollow" class="j a_show_login colbutt ll" name="pbtn-26723430-wish">
          <span>          
<form method="POST" action="https://www.douban.com/register?reason=collectwish" class="miniform">
    <input type="submit" class="minisubmit j " value="想读" title="">
</form>
          </span>
        </a>
        <a href="#" rel="nofollow" class="j a_show_login colbutt ll" name="pbtn-26723430-do">
          <span>          
<form method="POST" action="https://www.douban.com/register?reason=collectdo" class="miniform">
    <input type="submit" class="minisubmit j " value="在读" title="">
</form>
          </span>
        </a>
        <a href="#" rel="nofollow" class="j a_show_login colbutt ll" name="pbtn-26723430-collect">
          <span>       
<form method="POST" action="https://www.douban.com/register?reason=collectcollect" class="miniform">
    <input type="submit" class="minisubmit j " value="读过" title="">
</form>
          </span>
        </a>
      <div class="ll j a_stars">
    评价:
    <span id="rating"><span id="stars" data-solid="https://img3.doubanio.com/f/shire/5a2327c04c0c231bced131ddf3f4467eb80c1c86/pics/rating_icons/star_onmouseover.png" data-hollow="https://img3.doubanio.com/f/shire/2520c01967207a1735171056ec588c8c1257e5f8/pics/rating_icons/star_hollow_hover.png" data-solid-2x="https://img3.doubanio.com/f/shire/7258904022439076d57303c3b06ad195bf1dc41a/pics/rating_icons/star_onmouseover@2x.png" data-hollow-2x="https://img3.doubanio.com/f/shire/95cc2fa733221bb8edd28ad56a7145a5ad33383e/pics/rating_icons/star_hollow_hover@2x.png">

            <a href="https://www.douban.com/register?reason=rate" class="j a_show_login" name="pbtn-26723430-1">
        <img src="/Images/star_hollow_hover.png" id="star1" width="16" height="16"></a>
            <a href="https://www.douban.com/register?reason=rate" class="j a_show_login" name="pbtn-26723430-2">
        <img src="/Images/star_hollow_hover.png" id="star2" width="16" height="16"></a>
            <a href="https://www.douban.com/register?reason=rate" class="j a_show_login" name="pbtn-26723430-3">
        <img src="/Images/star_hollow_hover.png" id="star3" width="16" height="16"></a>
            <a href="https://www.douban.com/register?reason=rate" class="j a_show_login" name="pbtn-26723430-4">
        <img src="/Images/star_hollow_hover.png" id="star4" width="16" height="16"></a>
            <a href="https://www.douban.com/register?reason=rate" class="j a_show_login" name="pbtn-26723430-5">
        <img src="/Images/star_hollow_hover.png" id="star5" width="16" height="16"></a>
    </span><span id="rateword" class="pl"></span>
    <input id="n_rating" type="hidden" value="">
    </span>
      </div>
    </div>
  <div class="gtleft">
    <ul class="ul_subject_menu bicelink color_gray pt6 clearfix">
        <li>
          <img src="/Images/add-review.gif">&nbsp;<a href="https://www.douban.com/register?reason=annotate" class="j a_show_login" rel="nofollow">写笔记</a>
        </li>

          <li>
            <img src="/Images/add-review.gif">&nbsp;<a class="j a_show_login" href="https://www.douban.com/register?reason=review" rel="nofollow">写书评</a>
          </li>

      <li>
  <span class="rr">

    <img src="/Images/add-cart.gif">{{ $cates->price }}

    
    <span class="quantity">
    
        <input type="button" value="-" class="minus">
        <input type="hidden" name="id" value="{{$id}}">
        <input type="text" step="1" min="1" name="num" value="1" title="Qty" class="input-text qty text" style="width:40px;">
        <input type="button" value="+" class="plus">
        

    </span>
        {{csrf_field()}}
   
      <butto class="btn btn-primary btn-icon addCart">加入购物车</a>
      

  <span class="btn btn-primary btn-icon"><a href="{{url('/home/car/list')}}">购书单</a></span>

</span><br class="clearfix">
</li>
    
    <link type="text/css" rel="stylesheet" href="https://img3.doubanio.com/f/shire/8377b9498330a2e6f056d863987cc7a37eb4d486/css/ui/dialog.css"><script type="text/javascript" src=""></script><script>
    var __cache_url = __cache_url || {};
    (function(u){
        if(__cache_url[u]) return;
        __cache_url[u] = true;
        window.DoubanShareIcons = 'https://img3.doubanio.com/f/shire/d15ffd71f3f10a7210448fec5a68eaec66e7f7d0/pics/ic_shares.png';
        var initShareButton = function() {
          $.ajax({url:u,dataType:'script',cache:true});
        };
        if (typeof Do == 'function' && 'ready' in Do) {
          Do('https://img3.doubanio.com/f/shire/8377b9498330a2e6f056d863987cc7a37eb4d486/css/ui/dialog.css',
            'https://img3.doubanio.com/f/shire/4b3bad5e25de78678d700dd5353570dce3e6bbcc/js/ui/dialog.js',
            initShareButton);
        } else if(typeof Douban == 'object' && 'loader' in Douban) {
          Douban.loader.batch(
            'https://img3.doubanio.com/f/shire/8377b9498330a2e6f056d863987cc7a37eb4d486/css/ui/dialog.css',
            'https://img3.doubanio.com/f/shire/4b3bad5e25de78678d700dd5353570dce3e6bbcc/js/ui/dialog.js'
          ).done(initShareButton);
        }
    })('https://img3.doubanio.com/f/shire/3c817e21c473629a7e5fd09ca7f4eadf5ef24012/js/lib/sharebutton.js');
    </script>

    </ul>
  </div>
<!-- 写书评 =======================================================================-->

  <div id="overlay" style="height: 293px; width: 568px; margin-left: -284px; margin-top: -168.5px; top: 50%; left: 50%; display:none ">
  </div>
<div id="dialog" style="width: 550px; left: 50%; top: 50%; margin-top: -160.5px; margin-left: -276px; display:none;">
  <div>
    <div class="indentpop1 clearfix" display="none" >
    <!-- 提交的信息 -->
    <form action="{{ url('/home/comment/insert') }}" method="get">
          <div>

            <input type="hidden" name="uid" value="{{ session('id') }}">
            <input type="hidden" name="id" value="{{ $cates->id }}">
          </div>
          <div class="interest-form-hd">
            <span class="gact rr">
              <a href="javascript:;" onclick="close_dialog()">x</a>
            </span>
            <h2>添加收藏：写短评</h2>
          </div>
          <div class="topbar-wrapper">
            <span class="interest-status">
              <label>
                <input type="radio" value="wish" name="interest">&nbsp;想读
              </label>&nbsp;&nbsp;
              <label>
                <input type="radio" value="do" name="interest">&nbsp;在读
              </label>&nbsp;&nbsp;
              <label>
                <input type="radio" value="collect" name="interest">&nbsp;读过
              </label>&nbsp;&nbsp;
            </span>
            <span class="interest-rating">
              <span class="j a_stars">
                <span class="rate_stars">给个评价吧?(可选)
                  <span id="rating">
                    <span id="stars" data-solid="/Images/star_onmouseover.png" data-hollow="/Images/star_hollow_hover.png" data-solid-2x="/Images/star_onmouseover@2x.png" data-hollow-2x="/Images/star_hollow_hover@2x.png">
                      <img src="/Images/star_hollow_hover.png" id="star1" width="16" height="16">
                      <img src="/Images/star_hollow_hover.png" id="star2" width="16" height="16">
                      <img src="/Images/star_hollow_hover.png" id="star3" width="16" height="16">
                      <img src="/Images/star_hollow_hover.png" id="star4" width="16" height="16">
                      <img src="/Images/star_hollow_hover.png" id="star5" width="16" height="16">
                    </span>
                    <span id="rateword" class="pl"></span>
                      <input id="n_rating" type="hidden" value="" name="rating">
                    </span>
                </span>
              </span>
            </span>
          </div>
          <input id="foldcollect" name="foldcollect" value="F" type="hidden">
          <ul id="advtags" class="interest_form">
              <li>标签(多个标签用空格分隔):</li>
              <li><input name="tags" type="text" class="inp-tags"></li>
              <li id="mytags" class="clearfix"></li>
             
              <li class="comment-label">
                <span id="left_n" class="num">350</span>简短附注:</li>
              
              <li>
                <textarea name="comment" class="comment" id="comment" maxlength="350"></textarea>
              </li>
              <li class="private">
                <input id="inp-private" name="private" type="checkbox">
                <label class="pl" for="inp-private">仅自己可见</label>
              </li>
              <li>
                <div id="error" class="errnotnull"></div>
              </li>
          </ul>
          <div class="interest-form-ft" id="submits">
            <style>.bottom-setting{width:440px;*width:400px;float:left} #sync-setting:hover {background:none; color:#336699;} #sync-setting img{vertical-align:baseline;*vertical-align:middle;opacity:.5;filter:alpha(opacity=50);display:inline-block;width:10px;height:10px;*display:inline;zoom:1;position:relative;top:1px;margin-left:5px;} #sync-setting:hover img{opacity:.8;background:none;filter:alpha(opacity=80);} #sync-setting img{width:10px;height:10px;} .book-sns .private{float:none;} .share-label{margin:8px;vertical-align:middle;*vertical-align:middle;}</style>
            
            <span class="bn-flat">
              <input type="submit" value="保存">
            </span>
          </div>
          
      </form>
     <!-- 结束 -->
    </div>
  </div>
</div>





<!-- 书评结束 ====================================================================== -->
<div class="rec-sec">

    <span class="rec">

<a href="https://www.douban.com/accounts/register?reason=collect" class="j a_show_login lnk-sharing lnk-douban-sharing">推荐</a>
</span>
</div>

</div>
<br clear="all">
<div id="collect_form_26723430"></div>
<div class="related_info">
  <h2>
    <span class="">内容简介</span>
      &nbsp;·&nbsp;·&nbsp;·&nbsp;·&nbsp;·&nbsp;·
  </h2>
<div class="indent" id="link-report">
    
      <div class="">
        <style type="text/css" media="screen">
        .intro p{text-indent:2em;}
        </style>
        <div class="intro">
            <p>{{ $cates->introduce }}</p>
        </div>
      </div>
    
<style>
    #link-report .report { text-align: right; font-size: 12px; visibility: hidden; }
    #link-report .report a { color: #BBB; }
    #link-report .report a:hover { color: #FFF; background-color: #BBB; }
</style>
<script>
    Do = (typeof Do === 'undefined')? $ : Do;
    Do(function(){
    $("body").delegate("#link-report", 'mouseenter mouseleave', function(e){
      switch (e.type) {
        case "mouseenter":
          $(this).find(".report").css('visibility', 'visible');
          break;
        case "mouseleave":
          $(this).find(".report").css('visibility', 'hidden');
          break;
      }
    });
    $("#link-report").delegate(".report a", 'click', function(e){
        e.preventDefault();
        var auditUrl = "https://www.douban.com/misc/audit_report?url=",
        opt = "";
        var obj = $(e.target).closest('#link-report');
        var id = obj.length != 0 ? obj.data("id") : undefined;
        var params = (opt&&id) ? '?'.concat(opt, '=', id) : '';
        var url = auditUrl.concat("https://book.douban.com/subject/26723430/", params);
        window.location.href = url;
    });

    $("#link-report").append('<div class="report"><a rel="nofollow" href="#">举报</a></div>');
  });
</script>

</div>
<div id="db-tags-section" class="blank20">
  <h2>
    <span class="">豆瓣成员常用的标签(共32个)</span>
      &nbsp;·&nbsp;·&nbsp;·&nbsp;·&nbsp;·&nbsp;
  </h2>
  <div class="indent">    <span class="">
        <a class="  tag" href="/tag/外国文学">外国文学</a> &nbsp;    </span>
    <span class="">
        <a class="  tag" href="/tag/小说">小说</a> &nbsp;    </span>
    <span class="">
        <a class="  tag" href="/tag/文学">文学</a> &nbsp;    </span>
    <span class="">
        <a class="  tag" href="/tag/人生">人生</a> &nbsp;    </span>
    <span class="">
        <a class="  tag" href="/tag/非虚构故事">非虚构故事</a> &nbsp;    </span>
    <span class="">
        <a class="  tag" href="/tag/英国">英国</a> &nbsp;    </span>
    <span class="">
        <a class="  tag" href="/tag/牛津英语词典">牛津英语词典</a> &nbsp;    </span>
    <span class="">
        <a class="  tag" href="/tag/纪实">纪实</a> &nbsp;    </span>
  </div>
</div>
<div id="db-rec-section" class="block5 subject_show knnlike">
  <h2>
    <span class="">喜欢读"{{ $cates->name }}"的人也喜欢</span>
      &nbsp;·&nbsp;·&nbsp;·&nbsp;·&nbsp;·&nbsp;·
  </h2>
  <div class="content clearfix">
      @foreach($res as $k=>$v)
      <dl class="">
      @if(count($res)-1)
           <dt>
            <a href="{{ url('/home/xiangqing/show',['id'=>$v->id])}}" onclick="moreurl(this, {'total': 10, 'clicked': '26864983', 'pos': 0, 'identifier': 'book-rec-books'})"><img class="m_sub_img" src="{{ $v->pic }}" width="68px" height="98px"></a>
        </dt>
        <dd>
          <a href="{{ url('/home/xiangqing/show',['id'=>$v->id])}}" onclick="moreurl(this, {'total': 10, 'clicked': '26864983', 'pos': 0, 'identifier': 'book-rec-books'})" class="">
          {{ $v->name }}
            </a>
        </dd>
      </dl>
      @else   
       
          暂无推荐..
          @endif
        
      @endforeach
  </div>
</div>
    <link rel="stylesheet" href="Css/comment.css">
    <div class="mod-hd">
        <a class="redbutt j rr">
            <span id="dj"> 我来说两句 </span>
        </a>
  <h2>
    <span class="">短评</span>
      &nbsp;·&nbsp;·&nbsp;·&nbsp;·&nbsp;·&nbsp;·
      <span class="pl">&nbsp;(
          <a href="#">全部{{ $num }}条</a>
        ) </span>
  </h2>
    </div>
    <!-- 显示 或 隐藏短评标签 开始===========================================================-->
    <script type="text/javascript">
      // 绑定单击事件
      $('#dj').click(function(){
        // alert(2222);
        $('#overlay').css('display','block');
        $('#dialog').css('display','block');
      });
    </script>
    <!-- 显示 或 隐藏短评标签 结束===========================================================-->
    <div class="nav-tab">   
      <div class="tabs-wrapper  line">
          <a class="short-comment-tabs on-tab" href="new" data-tab="new" style="color:black;">最新</a>
          <span>/</span>  
          <a id="rmdp" class="short-comment-tabs " data-tab="hot" style="color:blue;">热门</a>
          <span>/</span>  
          <a class="j a_show_login " href="follows" data-tab="follows">好友</a>
          <input class="gid" type="hidden" name="id" value="{{ $id }}">
      </div>
    </div>
    <!-- 热门，和最新 ============================================-->
    <script type="text/javascript">
    // alert($);
  /*  $('#rmdp').click(function(){

      // alert(22222);
      var id = $(this).parent('.tabs-wrapper').find('.gid').val();
      // alert(id);
      var as = $(this).parents('.related_info').find('.sa');
      // alert(as);
      var dd = $(this);
      $.get('/home/xiangqing/rmpl',{id:id},function(data){
      // $.get('/home/xiangqing/love',{uid:uid,cid:id,love:i},function(data){  
        // if(data==1){
          as.html(data);
        // }
      });
    });*/
    </script>
    <!-- 热门，和最新+++++++++++++++++++++++++++++++++++++++ -->
    <div id="comment-list-wrapper" class="indent">
      <div class="comment-list hot show">
        <ul class="sa">   
@if(count($comments))          
  @foreach($comments as $k=>$v)  
      <li class="comment-item">
        <h3>
            <span class="comment-vote" style="float:right">
                <span id="c-1069634345" class="vote-count">{{ $v->love }}</span>
                    <a id="btn-1069634345" class="j love" data-cid="1069634345">有用</a>
                <span style="display:none" class="asd">{{ $v->id }}</span> 
                <span style="display:none" class="uasd">{{ session('id') }}</span>   
            </span>
            <span class="comment-info">
                <a href="{{ url('/home/day/show',[$v->uid])}}">{{ $v->username }}</a>
                    <span class="user-stars allstar50 rating" title="力荐"></span>
                <span>{{ $v->date }}</span>
            </span>
        </h3>
        <p class="comment-content">{{$v->comment}}</p>
    </li>         
  @endforeach 
@else
     <li class="comment-item">
        <p class="comment-content">暂无评论...</p>
    </li>
@endif
        </ul>
</div>

<div class="comment-list new noshow">

</div>

    </div>
    <script src="Scripts/short_comment_vote.js"></script>
    <script src="Scripts/short_comment_nav.js"></script>
    <script>
        (function(){
            $('.comment-list').delegate('.vote-comment', 'click', function(e) {
                vote_comment(e);
            }).delegate('.delete-comment', 'click', function(e) {
                if (confirm('确定删除吗？')) {
                    delete_comment(e);
                }
            });
        })();
    </script>
  <div id="reviews" class="ugc-mod">
    
</div>
<script type="text/javascript">
  $(document).ready(function(){
    var TEMPL_ADD_COL = '<a href="" id="n-{NOTE_ID}" class="colbutt ll add-col"><span>收藏</span></a>',
      TEMPL_DEL_COL = '<span class="pl">已收藏 &gt;<a href="" id="n-{NOTE_ID}" class="del-col">取消收藏</a></span>';

    $('body').delegate('.add-col', 'click', function(e){
      e.preventDefault();
      var nnid = $(this).attr('id').split('-')[1],
        bn_add = $(this);
      $.post_withck("/j/book/annotation_collect",{nid:nnid},function(){
        var a = $(TEMPL_DEL_COL.replace('{NOTE_ID}', nnid));
        bn_add.before(a);
        bn_add.remove();
      })
    });

    $('body').delegate('.del-col', 'click', function(e){
      e.preventDefault();
      var nnid = $(this).attr('id').split('-')[1],
        bn_del = $(this).parent();
      $.post_withck("/j/book/annotation_uncollect", {nid: nnid}, function() {
        var a = $(TEMPL_ADD_COL.replace('{NOTE_ID}', nnid));
        bn_del.before(a);
        bn_del.remove();
      })
    });

    $("pre.source").each(function(){
      var cn = $(this).attr('class').split(' ');
      l = cn[1];
      s = 'rand01';
      n = cn[2];
      $(this).snippet(n,{style: s, showNum: l});
    });

    var annotationMod = $('.reading-notes .bd')
      , annotationTabs = annotationMod.find('.inline-tabs li')
      , annotationTabLinks = annotationTabs.find('a')
      , annotationTabContents = annotationMod.find('ul.comments');

    annotationTabLinks.click(function(e){
      e.preventDefault();
      var el = $(this)
        , kind = el.attr('id');

      annotationTabs.removeClass('on');
      el.parent().addClass('on');
      annotationTabContents.hide();
      annotationTabContents.filter('.' + kind).show();
    });
  });
</script>

<script type="text/x-mathjax-config">
MathJax.Hub.Config({
  jax: ["input/TeX", "output/HTML-CSS"],
    extensions: ["tex2jax.js","TeX/AMSmath.js","TeX/AMSsymbols.js","TeX/noUndefined.js"],
    tex2jax: {
    inlineMath: [ ["($", "$)"], ['\\(','\\)'] ],
    displayMath: [ ["($$","$$)"], ['\\[','\\]']],
    skipTags: ["script","noscript","style","textarea"],
    processEscapes: true,
    processEnvironments: true,
    preview: "TeX"
  },
  showProcessingMessages: false
  });
</script>
<div id="db-discussion-section" class="indent ugc-mod">
  <h2>
    <span class="">友情链接</span>
      &nbsp;·&nbsp;·&nbsp;·&nbsp;·&nbsp;·&nbsp;·
  </h2>
</div>
</div>
<script type="text/javascript">
$(function(){if($.browser.msie && $.browser.version == 6.0){
    var maxWidth = parseInt($('#info').css('max-width'));
    if($('#info').width() > maxWidth)
        $('#info').width(maxWidth)
}});
</script>
</div>
      <div class="aside" style="left: 839.5px;">
  <div id="dale_book_subject_top_right"></div>
<style type="text/css" media="screen">
  .add2cartContainer{height:25px;overflow:hidden;vertical-align:bottom}.add2cartContainer .add2cart{margin-right:0;display:inline-block}#buyinfo h2{margin-bottom:6px}#buyinfo .bs{margin:0}#buyinfo li{position:relative;line-height:1;border-bottom:1px dashed #ddd}#buyinfo li a{display:block;padding:6px;border-radius:3px}#buyinfo li a:hover{color:#fff;background-color:#f7b779;background-image:url(Images/icon-brown.png);background-repeat:no-repeat;background-position:265px center}#buyinfo li a:hover .comment,#buyinfo li a:hover .buyinfo-promotion{color:#ab7947}#buyinfo li a:hover .buylink-price{color:#fff}#buyinfo li a:hover .saved-price{display:inline}#buyinfo li a:hover.other-edition{background-image:none}#buyinfo li .buylink-price{position:absolute;left:100px;color:#8fadc6}#buyinfo .more-info{color:#aaa;margin:6px 0 -2px 0}#buyinfo .price-page{text-align:center;border-bottom:1px solid #e4e4e4}#buyinfo .saved-price{display:none;margin-left:5px}#buyinfo .cart-tip{float:right;padding-right:5px;line-height:25px}#buyinfo #buyinfo-ebook{margin-bottom:15px}#buyinfo #buyinfo-ebook .buylink-price{left:auto;right:30px}#buyinfo-printed{margin-bottom:8px}#buyinfo-printed.no-border{border-bottom:0}#buyinfo-report{display:none}#buyinfo-report .lnk-close-report{float:right;margin-top:-30px;line-height:14px}#buyinfo-report .item{margin-bottom:10px}#buyinfo-report .item input{vertical-align:text-bottom;*vertical-align:middle}#buyinfo-report .item label{margin:0 5px 0 2px}#buyinfo-report .item-submit .bn-flat{margin-right:10px}#buyinfo-report .item-price input{width:220px;border:1px solid #ccc;padding:4px}#buyinfo-report form{margin:5px 0 10px}#bi-report-btn{float:right;margin:2px 0;line-height:14px;display:none}.bi-vendor-report{color:#aaa}.bi-vendor-report-form{display:none;color:#111;margin:0 5px;line-height:25px}.gray_ad .ebook-tag{margin-left:8px;padding:0 6px;line-height:20px;font-size:11px;border:1px solid #e6e6e2;background:#f1f1ed;display:inline-block;*display:inline;*zoom:1;vertical-align:top}@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi){#buyinfo li a:hover{background-image:url(Images/icon-brown@2x.png);background-size:16px 12px}}#intervenor-buyinfo h2{margin-bottom:6px}#intervenor-buyinfo .bs{margin:0}#intervenor-buyinfo li{position:relative;line-height:1;border-bottom:1px dashed #ddd}#intervenor-buyinfo li .basic-info{color:#494949;font-size:14px;line-height:18px}#intervenor-buyinfo li a{display:block;padding:10px 4px;border-radius:3px}#intervenor-buyinfo li a:hover{color:#000;background-color:#FFF;background-repeat:no-repeat;background-position:265px center}#intervenor-buyinfo li a:hover .comment{color:#e97e7e}#intervenor-buyinfo li a:hover .buy-btn{background:#fff;border:1px solid #e97e7e;border-radius:2px;color:#e97e7e}#intervenor-buyinfo li .buylink-price{position:absolute;left:140px;color:#9c9c9c}#intervenor-buyinfo .jd-buy-icon{float:left;margin-right:3px}#intervenor-buyinfo .buy-btn{float:right;position:absolute;right:10px;bottom:10px;color:#9c9c9c;padding:6px 12px;border:1px solid transparent}#intervenor-buyinfo .comment{color:#e97e7e;margin:6px 0 -2px 0}#intervenor-buyinfo .price-page a:hover{background-color:#f7b779;color:#FFF}#intervenor-buyinfo .price-page{text-align:center;border-bottom:1px solid #e4e4e4}#intervenor-buyinfo .saved-price{display:none;margin-left:5px}#intervenor-buyinfo .cart-tip{float:right;padding-right:5px;line-height:25px}#intervenor-buyinfo #buyinfo-ebook{margin-bottom:15px}#intervenor-buyinfo #buyinfo-ebook .buylink-price{left:auto;right:30px}

</style>
  <div class="gray_ad" id="buyinfo">
      <div id="buyinfo-printed">
        <h2 class="">
          在哪儿买这本书?
        </h2>
        <ul class="bs noline more-after ">      
                <li class="">
                    <a target="_blank" href="#" class="">
                      <div class="basic-info">
                        <span class="">京东商城</span>
                        <span class="buylink-price">
                          <span class="">
                            31.50 元
                          </span>
                            <span class="saved-price">
                              节省 8.0
                            </span>
                        </span>
                      </div>
                      
                    </a>
                </li>
                
                <li class="">
                    <a target="_blank" href="#" class="">
                      <div class="basic-info">
                        <span class="">当当网</span>
                        <span class="buylink-price">
                          <span class="">
                            29.60 元
                          </span>
                            <span class="saved-price">
                              节省 9.9
                            </span>
                        </span>
                      </div>
                      
                    </a>
                </li>
                
                <li class="">
                    <a target="_blank" href="#" class="">
                      <div class="basic-info">
                        <span class="">北发图书网</span>
                        <span class="buylink-price">
                          <span class="">
                            26.90 元
                          </span>
                            <span class="saved-price">
                              节省 12.6
                            </span>
                        </span>
                      </div>
                      
                    </a>
                </li>
                
                <li class="">
                    <a target="_blank" href="#" class="">
                      <div class="basic-info">
                        <span class="">亚马逊</span>
                        <span class="buylink-price">
                          <span class="">
                            31.50 元
                          </span>
                            <span class="saved-price">
                              节省 8.0
                            </span>
                        </span>
                      </div>
                      
                    </a>
                </li>
          <li class="price-page">
            <a href="#">
              查看 4 家网店价格
                （26.90 元起）
            </a>
          </li>
</ul>
      </div>    
  <div class="add2cartContainer ft
      no-border
    ">    
  <span class="add2cartWidget ll">
      <a class="j colbutt add2cart a_show_login" href="#" rel="nofollow">
        <span>加入购书单</span></a>
  </span>
    <span class="pl cart-tip">多本比价，批量购买</span>
  </div>
  </div>
<style class="text/css">
  .presale-indicator{display:inline-block;*display:inline;*zoom:1;width:24px;height:15px;line-height:15px;background:url(Images/presale_text.gif) no-repeat;text-indent:-9999px;vertical-align:middle;*vertical-align:0;_vertical-align:2px;margin-left:.5em}
</style>
  <div id="dale_book_subject_top_middle"></div>
  <h2>
    <span class="">这本书的其他版本 </span>
      &nbsp;·&nbsp;·&nbsp;·&nbsp;·&nbsp;·&nbsp;·
      <span class="pl">&nbsp;(
          <a href="#">全部7</a>
        ) </span>

  </h2>
  <div class="indent">
    <ul>
        <li class="mb8 pl">
          <a href="#">Harper Perennial版</a>
          1999-08 / 21人读过
        </li>
        <li class="mb8 pl">
          <a href="#">上海世纪出版集团 北京世纪文景版</a>
          2009-8 / 455人读过
        </li>
        <li class="mb8 pl">
          <a href="#">百花文艺版</a>
          2002-01 / 42人读过
        </li>
        <li class="mb8 pl">
          <a href="#">時報出版版</a>
          2000年 / 7人读过
        </li>
    </ul>
  </div>
  <h2>谁读这本书?</h2>
  <div class="indent" id="collector">
@foreach($who_do as $k=>$v)
<div class=""> 
    <div class="ll"><a href="{{ url('/home/xiangqing/books',['uid'=>$v->id])}}"><img src="{{ $v->pic }}" class="pil" alt="Dreamy Lambert"></a></div>
    <div style="padding-left:60px"><a class="" href="{{ url('/home/xiangqing/books',['id'=>$v->id])}}">{{ $v->username }}</a><br>
      <div class="pl ll">          {{ $v->date }}          想读      </div>
      <br>
    </div>
    <div class="clear"></div><br>
    <div class="ul" style="margin-bottom:12px;"></div>
</div>
@endforeach
        <p class="pl">&gt; <a href="#">{{ $do_page['wish'] }}人在读</a></p>
        <p class="pl">&gt; <a href="#">{{ $do_page['do'] }}人读过</a></p>
        <p class="pl">&gt; <a href="#">{{ $do_page['collect'] }}人想读</a></p>
  </div>
 
<!-- douban ad begin -->
<div id="dale_book_subject_middle_right"></div>
<script type="text/javascript">
    (function (global) {
        if(!document.getElementsByClassName) {
            document.getElementsByClassName = function(className) {
                return this.querySelectorAll("." + className);
            };
            Element.prototype.getElementsByClassName = document.getElementsByClassName;

        }
        var articles = global.document.getElementsByClassName('article'),
            asides = global.document.getElementsByClassName('aside');

        if (articles.length > 0 && asides.length > 0 && articles[0].offsetHeight >= asides[0].offsetHeight) {
            (global.DoubanAdSlots = global.DoubanAdSlots || []).push('dale_book_subject_middle_right');
        }
    })(this);
</script>
<!-- douban ad end -->
<p class="pl">订阅关于{{$cates->name}}的评论: <br><span class="feed">
      </div>
      <div class="extra">
        
  
<!-- douban ad begin -->
<div id="dale_book_subject_bottom_super_banner"></div>
<script type="text/javascript">
    (function (global) {
        var body = global.document.body,
            html = global.document.documentElement;

        var height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
        if (height >= 2000) {
            (global.DoubanAdSlots = global.DoubanAdSlots || []).push('dale_book_subject_bottom_super_banner');
        }
    })(this);
</script>
<!-- douban ad end -->
      </div>
    </div>
  </div>

@endsection
@section('myjs')

<script type="text/javascript">
  
  // alert($);
  $('.plus').click(function(){
    //获取当前数量
    var num = parseInt($('input[title=Qty]').val());
    num = num+1;
    //修改属性
    $('input[title=Qty]').val(num);
  });


  $('.minus').click(function(){
    //获取当前数量
    var num = parseInt($('input[title=Qty]').val());
    num = num-1;
    if(num == 0)return;
    //修改属性
    $('input[title=Qty]').val(num);
  });

    //单机事件 加入购物车
    $('.addCart').click(function(){

      //获取参数
      var id = $('.quantity').find('input[name=id]').val();
      var num = $('.quantity').find('input[name=num]').val();
      console.log(id,num);
      $.ajaxSetup({
        headers:{
          'X-CSRF-TOKEN':$('meta[name="csrf-token"]').attr('content')
        }
      });

      //发送ajax
      $.post('/home/car/che',{id:id,num:num},function(data){
       // console.log(data);
       
        if(data == 1){
            alert('加入购物车成功');
        }else{
          alert('加入购物车失败');
        }
      });
  });

</script>
<!-- 有用的ajax无刷新=================================================== -->
<script type="text/javascript"> 
      $.ajaxSetup({
            headers: {
                'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
            }
    });
      $(".love").unbind(); 
     $('.love').click(function(){
      // 获取uid
      // alert(12);
      var uid = $(this).parents('li').find('.uasd').html();
      var id = $(this).parents('li').find('.asd').html();
      var dd=$(this);
      var i=$('.vote-count').html();
      $.get('/home/xiangqing/love',{uid:uid,cid:id,love:i},function(data){
         if(data == 1){
               i=parseInt(i)+1;
                dd.parent('.comment-vote').find('.vote-count').html(i);
                alert('点赞成功...');
            }else if(data == 3){
                alert('亲，您点过赞了...');
            }else if(data == 2){
                return window.location.href='/home/login/login';
            }else{
              alert('点赞失败.');
            }
            return false;
        });
     return false;

    });
    </script>

@endsection